<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
  <th:block th:include="include :: header('修改持仓')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
  <form class="form-horizontal m" id="form-postion-edit" th:object="${invPostion}">


    <div class="form-group">
      <label class="col-sm-3 control-label">数据来源：</label>
      <div class="col-sm-9">
        <select class="form-control" name="type">
          <option value="0">同花顺</option>
          <option value="1">华宝</option>
        </select>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label">所属帐号：</label>
      <div class="col-sm-9">
        <select class="form-control" name="accountId">
          <option th:each="acc:${accs}" th:value="${acc.id}" th:text="${acc.name}"></option>
        </select>
      </div>
    </div>

    <div class="form-group">
      <label class="col-sm-3 control-label">持仓：</label>
      <div class="col-sm-9">
        <textarea type="text" name="invPostion" class="form-control" placeholder="请输入文本"></textarea>
      </div>
    </div>
  </form>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
  var prefix = ctx + "book/postion";
  $("#form-postion-edit").validate({
    focusCleanup: true
  });

  function submitHandler() {
    if ($.validate.form()) {
      $.operate.save(prefix + "/addList", $('#form-postion-edit').serialize());
    }
  }
</script>
</body>
</html>